<?php

declare(strict_types=1);

namespace App\Request\Store\Order;

use App\Request\RequestAbstract;

class DeliverRequest extends RequestAbstract
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'id' => ['required', 'integer'],
            'company_abbr' => ['required'],
            'number' => ['required'],
            'province' => ['required'], // 收件人省
            'city' => ['required'], // 收件人市
            'district' => ['required'], // 收件人区
            'sender_name' => ['required'], // 发件人姓名
            'sender_phone' => ['required'], // 发件人手机号
            'sender_province' => ['required'], // 发件人省
            'sender_city' => ['required'], // 发件人市
            'sender_district' => ['required'], // 发件人区
            'sender_addr' => ['required'], // 发件人地址
            'pay_type' => ['integer'], // 运费支付方式
        ];
    }
}
